home *** CD-ROM | disk | FTP | other *** search
/ Aminet 33 / Aminet 33 - October 1999.iso / Aminet / dev / c / MEMLib.lha / MEMLib / Developer / source.org / mwgetcwd.c < prev    next >
Encoding:
C/C++ Source or Header  |  1999-06-30  |  272 b   |  15 lines

  1. #include "mempriv.h"
  2. #undef getcwd
  3.  
  4. #include <dos.h>
  5.  
  6. char *MWGetCWD(char *path, int size, char *file, long line)
  7. {
  8.    if(path == NULL)
  9.    {
  10.       path = MWAllocMem(size, 0, MWI_MALLOC, file, line);
  11.       if(path == NULL) return NULL;
  12.    }
  13.    return getcwd(path, size);
  14. }
  15.